package com.ruoyi.analysis.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.analysis.mapper.ProductAnalysisPieceMapper;
import com.ruoyi.analysis.domain.ProductAnalysisPiece;
import com.ruoyi.analysis.service.IProductAnalysisPieceService;
import com.ruoyi.common.core.text.Convert;

/**
 * 工件生产数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-12-12
 */
@Service
public class ProductAnalysisPieceServiceImpl implements IProductAnalysisPieceService 
{
    @Autowired
    private ProductAnalysisPieceMapper productAnalysisPieceMapper;

    /**
     * 查询工件生产数据
     * 
     * @param id 工件生产数据主键
     * @return 工件生产数据
     */
    @Override
    public ProductAnalysisPiece selectProductAnalysisPieceById(Long id)
    {
        return productAnalysisPieceMapper.selectProductAnalysisPieceById(id);
    }

    /**
     * 查询工件生产数据列表
     * 
     * @param productAnalysisPiece 工件生产数据
     * @return 工件生产数据
     */
    @Override
    public List<ProductAnalysisPiece> selectProductAnalysisPieceList(ProductAnalysisPiece productAnalysisPiece)
    {
        return productAnalysisPieceMapper.selectProductAnalysisPieceList(productAnalysisPiece);
    }

    /**
     * 新增工件生产数据
     * 
     * @param productAnalysisPiece 工件生产数据
     * @return 结果
     */
    @Override
    public int insertProductAnalysisPiece(ProductAnalysisPiece productAnalysisPiece)
    {
        return productAnalysisPieceMapper.insertProductAnalysisPiece(productAnalysisPiece);
    }

    /**
     * 修改工件生产数据
     * 
     * @param productAnalysisPiece 工件生产数据
     * @return 结果
     */
    @Override
    public int updateProductAnalysisPiece(ProductAnalysisPiece productAnalysisPiece)
    {
        return productAnalysisPieceMapper.updateProductAnalysisPiece(productAnalysisPiece);
    }

    /**
     * 批量删除工件生产数据
     * 
     * @param ids 需要删除的工件生产数据主键
     * @return 结果
     */
    @Override
    public int deleteProductAnalysisPieceByIds(String ids)
    {
        return productAnalysisPieceMapper.deleteProductAnalysisPieceByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除工件生产数据信息
     * 
     * @param id 工件生产数据主键
     * @return 结果
     */
    @Override
    public int deleteProductAnalysisPieceById(Long id)
    {
        return productAnalysisPieceMapper.deleteProductAnalysisPieceById(id);
    }
}
